package org.dfzt.common.util;

import javax.annotation.Resource;

/**
 * @Description: redis工具工厂类
 * @author: cuiyf
 * @Date: 2020/8/19 8:57
 * @Version: 1.0
 */
public class RedisUtilFactory {
    private static RedisUtil redisUtil;
    private static RedisUtilByByte redisUtilByByte;
    private static RedisUtilByString redisUtilByString;


    private RedisUtilFactory(){}

    public static RedisUtil getJsonUtil(){
        if (redisUtil == null){
            redisUtil = SpringContextUtils.getBean(RedisUtil.class);
        }
        return redisUtil;
    }

    public static RedisUtilByByte getByteUtil(){
        if (redisUtilByByte == null){
            redisUtilByByte = SpringContextUtils.getBean(RedisUtilByByte.class);
        }
        return redisUtilByByte;
    }

    public static RedisUtilByString getStringUtil(){
        if (redisUtilByString == null){
            redisUtilByString = SpringContextUtils.getBean(RedisUtilByString.class);
        }
        return redisUtilByString;
    }


}
